home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / ghost / gs403src_amiga.lha / gs4.03 / unixtail.mak.in < prev    next >
Text File  |  1997-03-16  |  5KB  |  128 lines

  1. #    Copyright (C) 1990, 1995, 1996 Aladdin Enterprises.  All rights reserved.
  2. # This file is part of Aladdin Ghostscript.
  3. # Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. # or distributor accepts any responsibility for the consequences of using it,
  5. # or for whether it serves any particular purpose or works at all, unless he
  6. # or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. # License (the "License") for full details.
  8. # Every copy of Aladdin Ghostscript must include a copy of the License,
  9. # normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. # the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. # under certain conditions described in the License.  Among other things, the
  12. # License requires that the copyright notice and this notice be preserved on
  13. # all copies.
  14.  
  15. # Partial makefile common to all Unix configurations.
  16.  
  17. # This is the last part of the makefile for Unix configurations.
  18. # Since Unix make doesn't have an 'include' facility, we concatenate
  19. # the various parts of the makefile together by brute force (in tar_cat).
  20.  
  21. # Define the name of this makefile.
  22. UNIXTAIL_MAK=unixtail.mak
  23.  
  24. # The following prevents GNU make from constructing argument lists that
  25. # include all environment variables, which can easily be longer than
  26. # brain-damaged system V allows.
  27.  
  28. .NOEXPORT:
  29.  
  30. # -------------------------------- Library -------------------------------- #
  31.  
  32. amiga__=gp_nofb.$(OBJ) gp_amiga.$(OBJ) gdevpipe.$(OBJ) #ldexp.$(OBJ) frexp.$(OBJ) modf.$(OBJ)
  33. amiga_.dev: $(amiga__)
  34.     $(SETMOD) amiga_ $(amiga__)
  35.     $(ADDMOD) amiga_ -iodev pipe
  36.  
  37. gp_amiga.$(OBJ): gp_amiga.c $(AK) $(string__h) $(gx_h) $(gsexit_h) $(gp_h) \
  38.   $(time__h)
  39.  
  40. ## The Unix platforms
  41.  
  42. # We have to include a test for the existence of sys/time.h,
  43. # because some System V platforms don't have it.
  44.  
  45. # Define pipes as a separable feature.
  46.  
  47. pipe_=gdevpipe.$(OBJ)
  48. pipe.dev: $(UNIXTAIL_MAK) $(ECHOGS_XE) $(pipe_)
  49.     $(SETMOD) pipe $(pipe_)
  50.     $(ADDMOD) pipe -iodev pipe
  51.  
  52. gdevpipe.$(OBJ): gdevpipe.c $(AK) $(errno__h) $(stdio__h) $(string__h) \
  53.   $(gserror_h) $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(stream_h)
  54.  
  55. # Unix platforms other than System V, and also System V Release 4
  56. # (SVR4) platforms.
  57. unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ)
  58. unix_.dev: $(unix__)
  59.     $(SETMOD) unix_ $(unix__)
  60.  
  61. gp_unix.$(OBJ): gp_unix.c $(AK) $(string__h) $(gx_h) $(gsexit_h) $(gp_h) \
  62.   $(time__h)
  63.  
  64. # System V platforms other than SVR4, which lack some system calls,
  65. # but have pipes.
  66. sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ) gp_sysv.$(OBJ)
  67. sysv_.dev: $(sysv__)
  68.     $(SETMOD) sysv_ $(sysv__)
  69.  
  70. gp_sysv.$(OBJ): gp_sysv.c $(time__h) $(AK)
  71.  
  72. # -------------------------- Auxiliary programs --------------------------- #
  73.  
  74. $(ANSI2KNR_XE): ansi2knr.c
  75.     $(CCA2K) $(O)$(ANSI2KNR_XE) $(srcdir)/ansi2knr.c
  76.  
  77. $(ECHOGS_XE): echogs.c $(AK)
  78.     $(CCAUX) $(O)$(ECHOGS_XE) $(srcdir)/echogs.c
  79.  
  80. # On the RS/6000 (at least), compiling genarch.c with gcc with -O
  81. # produces a buggy executable.
  82. $(GENARCH_XE): genarch.c $(AK) $(stdpre_h) $(iref_h)
  83.     $(CCAUX) $(O)$(GENARCH_XE) $(srcdir)/genarch.c
  84.  
  85. $(GENCONF_XE): genconf.c $(AK) $(stdpre_h)
  86.     $(CCAUX) $(O)$(GENCONF_XE) $(srcdir)/genconf.c
  87.  
  88. $(GENINIT_XE): geninit.c $(AK) $(stdio__h) $(string__h)
  89.     $(CCAUX) -I. -I$(srcdir) $(O)$(GENINIT_XE) $(srcdir)/geninit.c
  90.  
  91. # We need to query the environment to construct gconfig_.h.
  92. INCLUDE=/usr/include
  93. gconfig_.h: $(UNIXTAIL_MAK) $(ECHOGS_XE)
  94.     ./echogs -w gconfig_.h -x 2f2a -s This file was generated automatically. -s -x 2a2f
  95.     if ( test -f $(INCLUDE)/sys/time.h ); then ./echogs -a gconfig_.h -x 23 define SYSTIME_H;\
  96.     fi
  97.     if ( test -f $(INCLUDE)/dirent.h ); then ./echogs -a gconfig_.h -x 23 define DIRENT_H;\
  98.     elif ( test -f $(INCLUDE)/sys/dir.h ); then ./echogs -a gconfig_.h -x 23 define SYSDIR_H;\
  99.     elif ( test -f $(INCLUDE)/sys/ndir.h ); then ./echogs -a gconfig_.h -x 23 define SYSNDIR_H;\
  100.     elif ( test -f $(INCLUDE)/ndir.h ); then ./echogs -a gconfig_.h -x 23 define NDIR_H;\
  101.     fi
  102.  
  103. # ----------------------------- Main program ------------------------------ #
  104.  
  105. # Interpreter main program
  106.  
  107. NONDEVS_ALL=gs.$(OBJ) imainarg.$(OBJ) imain.$(OBJ) $(INT_ALL) gconfig.$(OBJ) gscdefs.$(OBJ)
  108.  
  109. # Here is the final link step.  The stuff with LD_RUN_PATH is for SVR4
  110. # systems with dynamic library loading; I believe it's harmless elsewhere.
  111. # The resetting of the environment variables to empty strings is for SCO Unix,
  112. # which has limited environment space.
  113. $(GS_XE): ld.tr echogs $(NONDEVS_ALL) $(DEVS_ALL)
  114.     ./echogs -w ldt.tr -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(GS_XE)
  115.     ./echogs -a ldt.tr -n -s gs.$(OBJ) -s
  116.     cat ld.tr >>ldt.tr
  117.     ./echogs -a ldt.tr -s - $(EXTRALIBS) -lm
  118.     LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; \
  119.     XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
  120.     FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
  121.     DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
  122.     DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
  123.     DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= \
  124.     $(SH) <ldt.tr
  125.